<template>
	<view class="root">
		<view class="uni-padding-wrap" style="padding: 10px;">
			<view class="text-lg text-bold">{{news.title}}</view>
			<rich-text class="content" :nodes="news.content" style="padding: 10px;"></rich-text>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				news: {},
				id:0
			}
		},
		onShareAppMessage(){
			return {
			      title: '选楼盘，查佣金，看房价'
			    }
		},
		onLoad(e) {
			this.id = e.id ;
			var me=this;
			uni.request({
				url: me.$rootUrl+'/News/Find',
				data: {id:me.id},
				method: 'GET',
				success(res) {	
					if (res.data.success) {
						me.news=res.data.data;
					} else {
						uni.showModal({
							content: '服务器错误!',
							showCancel: false
						});
					}
				},
				fail() {
					uni.showModal({
						content: me.connectionFailText,
						showCancel: false
					});
				}
			});
		}
	}
</script>
<style>
</style>
